cmake_minimum_required(VERSION 3.7)
project(aicc)

set (CMAKE_CXX_STANDARD 17)

# LLVM
find_package(LLVM REQUIRED CONFIG)

message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")

include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})

llvm_map_components_to_libnames(llvm_libs support core irreader passes)

set(SOURCE_FILES main.cpp AIPasses/mem_to_reg.cpp AIPasses/zero_prop.cpp)

add_executable(aicc ${SOURCE_FILES})
target_link_libraries(aicc ${llvm_libs})
